package com.yisu.auction.api.core.mapper;

import com.yisu.auction.ewf.entity.GoodsInfo;
import org.apache.ibatis.annotations.Param;

public interface GoodsInfoMapper {
    int deleteByPrimaryKey(Long id);

    int insert(GoodsInfo record);

    int insertSelective(GoodsInfo record);

    GoodsInfo selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(GoodsInfo record);

    int updateByPrimaryKeyWithBLOBs(GoodsInfo record);

    int updateByPrimaryKey(GoodsInfo record);

    /**
     * author:赵杰
     * Business Description : 通过商品Id获取改商品最大期号
     * @param goodsId 商品ID
     * @return
     */
    int getMaxTermByGoodsId(@Param("goodsId")long goodsId);


    /**
     * author:赵杰
     * Business Description : 通过prizeId修改商品累计购买金额
     * @param goodsId
     * @return
     */
    int updateAccumulativeBuyMoneyByGoodsId(@Param("goodsId") long goodsId);

    /**
     * author:赵杰
     * Business Description : 通过goodsId修改商品累计购买金额
     * @param goodsId 商品ID
     * @return
     */
    int cleanOpenPrizeWaterLevelByGoodsId(@Param("goodsId")long goodsId);
}